﻿#include "selectwin.h"
#include "ui_selectwin.h"

SelectWin::SelectWin(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::SelectWin)
{
    ui->setupUi(this);
    model=new QSqlTableModel;
}

SelectWin::~SelectWin()
{
    delete ui;
}

void SelectWin::on_pushButton_clicked()
{
    if(ui->attendRadioBtn->isChecked()){
        model->setTable("employee");
    }else if(ui->wokerRadioBtn->isChecked()){
        model->setTable("attendance");
    }
    model->select();
    ui->tableView->setModel(model);
}

